package surname.protocol;


/**
 * Edit surname request class. This object can be sent to the server with the
 * old surname of the new surname
 * This class is serializable and can be sent through the network.
 *
 * @author Thomas Di'Meco / Laura Martellotto - Gwenn Aubert / Matthieu Maugard - SI4 Groupe 1
 */
public class EditSurnameRequest extends AbstractRequest
{
    private static final long serialVersionUID = 1L;

    private String oldSurname;
    private String newSurname;

    /**
     * Create an empty edit surname request
     */
    public EditSurnameRequest ()
    {
        super();
        this.oldSurname = "";
        this.newSurname = "";
    }

    /**
     * Create an edit surname request with the old surname and the new surname
     * @param oldSurname The old surname
     * @param newSurname The new surname
     */
    public EditSurnameRequest (String oldSurname, String newSurname)
    {
        super();
        this.oldSurname = oldSurname;
        this.newSurname = newSurname;
    }

    /**
     * @return The old surname
     */
    public String getOldSurname ()
    {
        return oldSurname;
    }

    /**
     * @param oldSurname The old surname
     */
    public void setOldSurname (String oldSurname)
    {
        this.oldSurname = oldSurname;
    }

    /**
     * @return The new surname
     */
    public String getNewSurname ()
    {
        return newSurname;
    }

    /**
     * @param newSurname The new surname
     */
    public void setNewSurname (String newSurname)
    {
        this.newSurname = newSurname;
    }
}
